﻿<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <title>登录</title>

    <link rel="stylesheet" type="text/css" href="../css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../css/login.css">

    <script src="../js/jquery-1.10.2.min.js"></script>
    <script src="../js/jquery.cookie.min.js"></script>
</head>

<body>
<!-- top begin -->
<div class="w">
    <div id="logo">
        <a href="javascript:void(0)">
            <img src="../images/logo_white.png" alt="么嘛哒" width="170" height="60">
        </a>
        <b></b>
    </div>
</div>
<!-- top end -->

<div id="content">
    <div class="login-wrap">
        <div class="w">
            <div class="login-form">
                <div class="login-box">
                    <div class="mt">
                        <h1>么嘛哒会员</h1>
                        <div class="extra-r">
                            <div class="regist-link">
                                <a href="javascript:void(0)" target="_blank">
                                    <b><i class="fa fa-chevron-circle-right"></i></b>立即注册
                                </a>
                            </div>
                        </div>
                    </div>

                    <div class="msg-wrap">
                        <div class="msg-warn">
                            <b><i class="fa fa-lightbulb-o"></i></b>公共场所不建议自动登录，以防账号丢失
                        </div>
                    </div>

                    <div class="mc">
                        <div class="form">
                            <form id="validation-form" action="/shop-pc/login" method="post">
                                <div class="item item-fore1">
                                    <label for="loginname" class="login-label name-label">
                                        <i class="fa fa-user"></i>
                                    </label>

                                    <input id="username" type="text" class="itxt" name="username" tabindex="1" autocomplete="off" value="" placeholder="邮箱/用户名/已验证手机">

                                    <span class="clear-btn" style="display: inline;"></span>
                                </div>

                                <div id="entry" class="item item-fore2">
                                    <label class="login-label pwd-label" for="nloginpwd">
                                        <i class="fa fa-lock"></i>
                                    </label>

                                    <input type="password" id="password" name="password" class="itxt itxt-error" tabindex="2" autocomplete="off" placeholder="密码">
                                </div>

                                <div class="item item-fore3">
                                    <div class="safe">
                                        <span>
                                            <input id="rememberMe" name="rememberMe" value="true" type="checkbox" class="jdcheckbox" tabindex="3">
                                            <label for="">记住密码</label>
                                        </span>

                                        <span class="forget-pw-safe">
                                            <a href="/shop-pc/findPwd" class="" target="_blank">忘记密码?</a>
                                        </span>
                                    </div>
                                </div>

                                <div class="item item-fore5">
                                    <div class="login-btn">
                                        <a href="javascript:;" class="btn-img btn-entry" id="loginsubmit" tabindex="6" clstag="pageclick|keycount|20150112ABD|2">登&nbsp;&nbsp;&nbsp;&nbsp;录</a>
                                    </div>
                                </div>

                            </form>
                        </div>
                    </div>

                </div>
            </div>

            <!-- login-banner begin -->
            <div class="login-banner" style="background-color: #1d90bf">
                <div class="w">
                    <div id="banner-bg" class="i-inner" style="background: url(../images/login_banner.jpg) 0px 0px no-repeat;background-color: #1d90bf">
                    </div>
                </div>
            </div>
            <!-- login-banner end -->

        </div>
    </div>
</div>

<!-- foot begin -->
<div class="w">
    <div id="footer-2013">
        <div class="links">
            <a rel="nofollow" target="_blank" href="#">
                关于我们
            </a>
            |
            <a rel="nofollow" target="_blank" href="#">
                联系我们
            </a>
            |
            <a rel="nofollow" target="_blank" href="#">
                人才招聘
            </a>
            |
            <a rel="nofollow" target="_blank" href="#">
                商家入驻
            </a>
            |
            <a rel="nofollow" target="_blank" href="#">
                广告服务
            </a>
            |
            <a rel="nofollow" target="_blank" href="#">
                手机么马达
            </a>
            |
            <a target="_blank" href="#">
                友情链接
            </a>
            |
            <a target="_blank" href=#">
                销售联盟
            </a>

        </div>
        <div class="copyright">
            Copyright©2015-2016&nbsp;&nbsp;么嘛哒&nbsp;版权所有
        </div>
    </div>
</div>
<!-- foot end -->

<script>

    //cookie
    if ($.cookie("rememberMe") == "true") {
        $("#rememberMe").attr("checked", true);
        $("#username").val($.cookie("username"));
        $("#password").val($.cookie("password"));
    }


    //---------------登陆----------------
    $(function () {
        $("#loginsubmit").click(function () {
            var rememberMe = $("#rememberMe");
            if (rememberMe[0].checked == true) {
                var username = $("#username").val();
                var password = $("#password").val();
                $.cookie("rememberMe", "true", {expires: 7, path: '/'}); // 存储一个带7天期限的 cookie
                $.cookie("username", username, {expires: 7, path: '/'}); // 存储一个带7天期限的 cookie
                $.cookie("password", password, {expires: 7, path: '/'}); // 存储一个带7天期限的 cookie
            }
            else {
                $.cookie("rememberMe", "false", {expires: -1});
                $.cookie("username", '', {expires: -1});
                $.cookie("password", '', {expires: -1});
            }

            $("#validation-form").submit();
        })
    })
</script>
</body>
</html>
